<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<!-- jstl jsp的标签 -->
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%><!-- 使用额外的或者自定义标签  prefix-->
<%@ taglib prefix="paging" uri="/WEB-INF/paging.tld"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();//取项目名
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";//取协议 主机名 端口
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<!-- 无论实际的相对路径是什么 都重新定义为 项目名下的相对路径 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>

</head>
<body>
	<!-- 为什么写标签能够达到 原始java代码输出的效果 ,背后有java读取到你的文本 利用反射调用方法完成输出
 语言 叫做 el表达式 
-->

	<input id="msg" value="${sessionScope.msg}" type="hidden">
	<c:if test="${sessionScope.msg != null}">
		<script type="text/javascript">
			var msg = document.getElementById("msg").value;
			alert(msg);
		</script>
		<c:remove var="msg" scope="session" />
	</c:if>
	<table border="1">
		<tr>
			<th>编号</th>
			<th>姓名</th>
			<th>性别</th>
			<th>电话号码</th>
			<th colspan="2">操作</th>
		</tr>
		<c:forEach items="${customers}" var="customer">
			<tr>
				<td>${customer.CUid}</td>
				<td>${customer.CUname}</td>
				<td>${customer.CUsex}</td>
				<td>${customer.CUphone}</td>
				<td><a href="controller/customer/customer?cuid=${customer.CUid}&op=update&reqOrRes=req">修改</a></td>
				<td>删除</td>
			</tr>
		</c:forEach>
	</table>
	<paging:paging pageSize="${pageInfo.pageSize}"
		href="controller/customer/customers/page"
		offerset="${pageInfo.offerset}"
		totalRecords="${pageInfo.totalRecords}" />
	<a href="back/customer/add.jsp">新增</a>
	
</body>
</html>